<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    </head>
    <body>
        <script>
            new Promise((resolve, reject) => {
                setTimeout(() => {
                    resolve('成功')
                    console.log('promise 任务 ')
                })
                // reject('失败')
            })
                .then(
                    //异步执行
                    value => {
                        console.log(value)
                        return 'them result'
                    },
                    reason => {
                        console.log(reason)
                    }
                )
                .then(v => {
                    console.log(v)
                })
            console.log('同步...')
        </script>
    </body>
</html>
